#pragma once
#include <iostream>
#include <vector>
// #include <EventLoop.h>

namespace muduo{
    class LoopThread;
    class EventLoop;
    class LoopThreadPool{
    private:
        int _thread_num;    //线程池数量
        int _next_index;    //下一个的id，包括连接的id与定时器id
        EventLoop* _base_loop;  //基础的loop，listen套接字的lopp
        std::vector<LoopThread*> _thread_pool;  //线程池
        std::vector<EventLoop*> _loops; //管理多个loop
    public:
        LoopThreadPool(EventLoop* baseloop);
        void Create();                          //创建线程池，即num个EventLoop
        void Set_thread_num(int num);
        EventLoop* nextEventLoop();
    };
}